<template>
	<div class="header">
		<span class="back" v-show="isBack" @click="back">返回</span>
		<h1 class="headerText">{{ headerText }}</h1>
	</div>
</template>
<script>
export default {
	props: {
		headerText: String,
		isBack:{
			type:Boolean,
			default:true
		}
	},
	methods: {
		back (){
			this.$router.go(-1)
		}
	}
}
</script>
<style lang="stylus" scoped="">
	.header
		z-index: 3
		position: fixed
		top: 0
		left: 0
		right: 0
		height: .86rem
		line-height: .86rem
		background: #20d9bb
		color: #fff
		.back
			position:absolute;
			top: 0
			left: .32rem
			color: white
			font-size: .3rem
		.headerText
			margin: 0 10%
			width: 80%
			font-size: .32rem
			text-align: center
</style>
